<template>
  <div class="login">
    <div class="box">
      <div class="left">
        <img src="@/assets/images/management/login.png" height="659" width="737" />
      </div>
      <div class="right">
        <div class="login-box">
          <h3>用户名</h3>
          <input
            v-model="phone"
            class="input"
            placeholder="请输入用户名/手机号/邮箱"
            type="text"
            @input="getPhone"
          />
          <div class="input-box">
            <input
              v-if="isGetCocing"
              v-model="password"
              class="input"
              placeholder="请输入您的验证码"
              type="text"
            />
            <input
              v-else
              v-model="password"
              class="input"
              placeholder="请输入您的密码"
              :type="passwordType"
            />
            <i
              :class="passwordType === 'password' ? 'el-icon-view on' : 'el-icon-view'"
              class="show-pwd"
              @click="showPwd"
            />
            <div v-if="isGetCocing" class="but" @click.stop="LoginClass.getCaptchaGetCode()">
              {{ codeText }}
            </div>
          </div>
          <!-- <Vcode
              :show="isShow"
              :slider-text="sliderText"
              @success="success"
              @close="close"
            /> -->
          <button class="btn" @click="LoginClass.updataLogin()">登 录</button>
          <div class="forget">忘记密码?</div>
        </div>
      </div>
    </div>
    <div class="footer">
      <p>版权所有 贵州钱多多科技有限公司</p>
      <p>@{{ year }} PFUNI.CN 黔ICP备19010969号-1</p>
    </div>
    <div class="bj"></div>
  </div>
</template>

<script>
import { LoginClass } from '@/modules/login.ts' //导航数据
export default {
  setup() {
    return { LoginClass }
  }
}
</script>

<style lang="scss" scoped>
.login {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  background: #24282c;
  padding: 10px;
  box-sizing: border-box;
  min-width: 1200px;
  margin: 0 auto;
  .bj {
    position: absolute;
    bottom: -80px;
    left: 0;
    width: 100%;
    height: 777px;
    box-sizing: border-box;
    overflow: hidden;
    z-index: 1;
    background: url('../../assets/imgages/management/loginbj.png') repeat-x;
    animation: animate-cloud 0s linear infinite;
    opacity: 0.3;
  }
  .box {
    padding: 0 20px;
    display: flex;
    position: relative;
    overflow: hidden;
    z-index: 100;
    .left {
      flex: 1;
      img {
        display: block;
        width: 60%;
        height: auto;
        margin: 18% auto 0;
        animation: down 1.5s linear infinite;
      }
    }
    .right {
      padding: 10px;
      flex: 1;
      .login-box {
        background: #fff;
        padding: 20px;
        border-radius: 10px;
        width: 50%;
        box-sizing: border-box;
        margin: 20% auto 0;
        position: relative;
        h3 {
          margin: 20px 0;
        }
        .input-box {
          position: relative;
          width: 100%;
          box-sizing: border-box;
          .but {
            position: absolute;
            top: 5px;
            right: 10px;
            width: 120px;
            box-sizing: border-box;
            padding: 0 20px;
            height: 40px;
            line-height: 40px;
            border: 1px solid #00c1de;
            border-radius: 10px;
            outline: none;
            -webkit-appearance: none;
            background: #00c1de;
            color: #fff;
            font-size: 14px;
            cursor: pointer;
            text-align: center;
          }
        }
        .input {
          width: 100%;
          margin-bottom: 20px;
          box-sizing: border-box;
          padding: 0 20px;
          height: 50px;
          border: 1px solid #999;
          border-radius: 10px;
          outline: none;
          -webkit-appearance: none;
          color: #24282c;
        }
        .btn {
          width: 100%;
          margin: 50px auto 10px;
          box-sizing: border-box;
          padding: 0 20px;
          height: 50px;
          border: 1px solid #00c1de;
          border-radius: 10px;
          outline: none;
          -webkit-appearance: none;
          background: #00c1de;
          color: #fff;
          font-size: 18px;
          cursor: pointer;
        }
        .forget {
          text-align: right;
          cursor: pointer;
          color: #999;
          font-size: 12px;
        }
      }
    }
  }
  .show-pwd {
    position: absolute;
    z-index: 99;
    top: 13px;
    right: 20px;
    cursor: pointer;
    font-size: 30px;
    color: #00c1de;
    &.on {
      color: #889aa4;
    }
  }
  .footer {
    text-align: center;
    color: #fff;
    line-height: 30px;
    margin: 10% auto 10px;
    font-size: 12px;
    position: relative;
    z-index: 99;
  }
}

@-webkit-keyframes down {
  25% {
    -webkit-transform: translateY(-10px);
  }
  50%,
  100% {
    -webkit-transform: translateY(0);
  }
  75% {
    -webkit-transform: translateY(10px);
  }
}
@-webkit-keyframes animate-cloud {
  from {
    background-position: 1024px 100%;
  }
  to {
    background-position: 0 100%;
  }
}

//发光效果
@keyframes scaless {
  0% {
    transform: scale(1);
  }
  50%,
  75% {
    transform: scale(3);
  }
  78%,
  100% {
    opacity: 0;
  }
}
</style>
